package Lesson4;

import java.util.Arrays;
import java.util.Scanner;

public class Task3 {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);
		System.out.println("Enter the length of the array");
		
		int length = sc.nextInt();
		int[] arr = new int [length];
		int[] down = new int [arr.length];
		
		
		int num;
		
		System.out.println("Enter the numbers in the elements of the array");

		for (int i = 0; i < arr.length; i++)
		{
			System.out.print((i+1)+". ");
			num = sc.nextInt();
			arr [i] = num;
			
		}
		System.out.println();
		
		for(int i = 0; i< arr.length; i++)
		{
			if (arr[i] > 0)
			{
				down[i] = (- arr[i]);
			}
			else
			{
				down[i] = ( arr[i] * (-1));
			}
			System.out.print(down[i] + " ");
		}
		
	}

}
